/*
 * Lambda.h
 *
 *  Created on: 17/nov/2010
 *      Author: computer
 */

#ifndef LAMBDA_H_
#define LAMBDA_H_
#include "Expression.h"
#include "Functor.h"

namespace TreeExpression {

class Lambda : public Expression_CRTP<Lambda>, public Functor {
	public:
		Lambda(const std::string&);
		Lambda(const Lambda&);
		~Lambda();

		virtual AutoPointer<Expression> eval(CopyPointer<Context>&);

		virtual Expression* clone() const;

		void addInstruction(const AutoPointer<Expression>&);

	private:
		std::list< AutoPointer<Expression> > listInstruction;
};

}

#endif /* LAMBDA_H_ */
